<template>
  <ItemWrap title="当前已入库待上架">
    <div class="w-full h-full">
      <div class="flex flex-row gap-3x h-full">
        <div class="fk-class1 flex-1 h-full">
          <div class="box">
            <div class="flex current-time-class asn-nomargin-class">
              <span class="current-name-time asn-class-size">ASN123456</span>
              <span class="img-display-layout"
                ><img
                  class="header-img-customer"
                  src="../assets/imgs/img/gj.png"
              /></span>
            </div>
            <div class="current-value-class">
              <span class="current-value-time">2024-8-29 13:48:00</span>
            </div>
          </div>

          <div class="box" style="margin-top: 2px">
            <div class="flex">
              <div class="flex-1 flex-col rk-info-class">
                <div class="current-time-class">
                  <span class="current-name-time">托盘数</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">500</span>
                </div>
              </div>
              <div class="flex flex-col rk-info-num-class">
                <div class="current-time-class">
                  <span class="current-name-time">数量</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">300</span>
                </div>
              </div>
            </div>
          </div>

          <!-- 国内或者国际 -->
          <div class="box" style="margin-top: 2px">
            <div class="inner-internation">
              <img
                src="../assets/imgs/img/zuo_xuxian.png"
                class="fg-line-class"
              />
            </div>
            <div class="h-full gys-class">
              <span class="current-value-time gys-value"
                >上海雷珏物流有限公司</span
              >
            </div>
          </div>
        </div>
        <div class="fk-class1 flex-1 h-full">
          <div class="box">
            <div class="flex current-time-class asn-nomargin-class">
              <span class="current-name-time asn-class-size">ASN123456</span>
              <span class="img-display-layout"
                ><img
                  class="header-img-customer"
                  src="../assets/imgs/img/china.png"
              /></span>
            </div>
            <div class="current-value-class">
              <span class="current-value-time">2024-8-29 13:48:00</span>
            </div>
          </div>

          <div class="box" style="margin-top: 2px">
            <div class="flex">
              <div class="flex-1 flex-col rk-info-class">
                <div class="current-time-class">
                  <span class="current-name-time">托盘数</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">500</span>
                </div>
              </div>
              <div class="flex flex-col rk-info-num-class">
                <div class="current-time-class">
                  <span class="current-name-time">数量</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">300</span>
                </div>
              </div>
            </div>
          </div>

          <!-- 国内或者国际 -->
          <div class="box" style="margin-top: 2px">
            <div class="inner-internation">
              <img
                src="../assets/imgs/img/zuo_xuxian.png"
                class="fg-line-class"
              />
            </div>
            <div class="h-full gys-class">
              <span class="current-value-time gys-value"
                >温岭市益鼎帽业有限公司</span
              >
            </div>
          </div>
        </div>

        <div class="fk-class1 flex-1 h-full">
          <div class="box">
            <div class="flex current-time-class asn-nomargin-class">
              <span class="current-name-time asn-class-size">ASN123456</span>
              <span class="img-display-layout"
                ><img
                  class="header-img-customer"
                  src="../assets/imgs/img/china.png"
              /></span>
            </div>
            <div class="current-value-class">
              <span class="current-value-time">2024-8-29 13:48:00</span>
            </div>
          </div>

          <div class="box" style="margin-top: 2px">
            <div class="flex">
              <div class="flex-1 flex-col rk-info-class">
                <div class="current-time-class">
                  <span class="current-name-time">托盘数</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">500</span>
                </div>
              </div>
              <div class="flex flex-col rk-info-num-class">
                <div class="current-time-class">
                  <span class="current-name-time">数量</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">300</span>
                </div>
              </div>
            </div>
          </div>

          <!-- 国内或者国际 -->
          <div class="box" style="margin-top: 2px">
            <div class="inner-internation">
              <img
                src="../assets/imgs/img/zuo_xuxian.png"
                class="fg-line-class"
              />
            </div>
            <div class="h-full gys-class">
              <span class="current-value-time gys-value"
                >深圳市零集创意科技有限公司</span
              >
            </div>
          </div>
        </div>

        <div class="fk-class1 flex-1 h-full">
          <div class="box">
            <div class="flex current-time-class asn-nomargin-class">
              <span class="current-name-time asn-class-size">ASN123456</span>
              <span class="img-display-layout"
                ><img
                  class="header-img-customer"
                  src="../assets/imgs/img/gj.png"
              /></span>
            </div>
            <div class="current-value-class">
              <span class="current-value-time">2024-8-29 13:48:00</span>
            </div>
          </div>

          <div class="box" style="margin-top: 2px">
            <div class="flex">
              <div class="flex-1 flex-col rk-info-class">
                <div class="current-time-class">
                  <span class="current-name-time">托盘数</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">500</span>
                </div>
              </div>
              <div class="flex flex-col rk-info-num-class">
                <div class="current-time-class">
                  <span class="current-name-time">数量</span>
                </div>
                <div class="current-value-class">
                  <span class="current-value-time font-style-class">300</span>
                </div>
              </div>
            </div>
          </div>

          <!-- 国内或者国际 -->
          <div class="box" style="margin-top: 2px">
            <div class="inner-internation">
              <img
                src="../assets/imgs/img/zuo_xuxian.png"
                class="fg-line-class"
              />
            </div>
            <div class="h-full gys-class">
              <span class="current-value-time gys-value"
                >安徽甄养优品生物科技有限公司</span
              >
            </div>
          </div>
        </div>
      </div>
    </div>
  </ItemWrap>
</template>
<script setup>
import { onMounted, ref, watchEffect, onBeforeUnmount } from "vue";
import ItemWrap from "./item-wrap/item-wrap.vue";
import Highcharts from "highcharts/highcharts";
import highcharts3d from "highcharts/highcharts-3d";
import "../assets/css/totalData.css";

const list = ref([
  {
    gatewayno: "PH100109",
    createTime: "2024-08-23 08:00",
    num: 100,
    doPeople: "国际",
  },
  {
    gatewayno: "PH1001010",
    createTime: "2024-08-23 08:05",
    num: 200,
    doPeople: "国内",
  },
  {
    gatewayno: "PH100109",
    createTime: "2024-08-23 08:00",
    num: 100,
    doPeople: "国际",
  },
  {
    gatewayno: "PH1001010",
    createTime: "2024-08-23 08:05",
    num: 200,
    doPeople: "国内",
  },
  {
    gatewayno: "PH1001010",
    createTime: "2024-08-23 08:05",
    num: 200,
    doPeople: "国内",
  },
  // 你可以添加更多的静态数据项
]);

const currentIndex = ref(0);
const interval = ref(null);

const updateIndex = () => {
  currentIndex.value = (currentIndex.value + 1) % list.value.length;
};

onMounted(() => {
  interval.value = setInterval(updateIndex, 3000); // 3秒切换一次
});

onBeforeUnmount(() => {
  clearInterval(interval.value);
});

const beforeEnter = (el) => {
  el.style.opacity = 0;
};
const enter = (el, done) => {
  el.offsetHeight; // trigger reflow
  el.style.transition = "opacity 1s";
  el.style.opacity = 1;
  done();
};
const leave = (el, done) => {
  el.style.transition = "opacity 1s";
  el.style.opacity = 0;
  done();
};
</script>
<style lang="scss" scoped>
.left_boottom_wrap {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.doudong {
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

.left_boottom {
  .left_boottom_item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 14px;
    margin: 10px 0;
    .orderNum {
      margin: 0 16px 0 -20px;
    }

    .info {
      margin-right: 10px;
      display: flex;
      align-items: center;
      color: #fff;

      .labels {
        flex-shrink: 0;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
      }

      .zhuyao {
        font-size: 15px;
      }

      .ciyao {
        color: rgba(255, 255, 255, 0.8);
      }

      .warning {
        color: #e6a23c;
        font-size: 15px;
      }
    }

    .inner_right {
      position: relative;
      height: 100%;
      width: 380px;
      flex-shrink: 0;
      line-height: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      .dibu {
        position: absolute;
        height: 2px;
        width: 104%;
        background-image: url("../assets/imgs/img/zuo_xuxian.png");
        bottom: -10px;
        left: -2%;
        background-size: cover;
      }
      .addresswrap {
        width: 100%;
        display: flex;
        margin-top: 8px;
      }
    }

    .wangguan {
      color: #1890ff;
      font-weight: 900;
      font-size: 15px;
      width: 80px;
      flex-shrink: 0;
    }

    .time {
      font-size: 12px;
      color: #fff;
    }

    .address {
      font-size: 12px;
      cursor: pointer;
    }

    .types {
      width: 30px;
      flex-shrink: 0;
    }

    .typeRed {
      color: #fc1a1a;
    }

    .typeGreen {
      color: #29fc29;
    }
    .orderNum {
      color: #00b8ff;
    }
  }
}

.left_boottom_item {
  transition: opacity 1s;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 1s;
}

.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {
  opacity: 0;
}
</style>
